package com.minhua.jijiehao2.mainframe.circle.businessListActivity.impl

import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.BusinessBean
import com.minhua.jijiehao2.http.*
import com.minhua.jijiehao2.mainframe.circle.businessListActivity.imp.IBusinessListModel

class BusinessListModel : IBusinessListModel {

    override fun getBusinessList(map: ParamsMap, callBack: CallBack<List<BusinessBean>>) {
        HttpController<List<BusinessBean>>().doHttp(
                ApiClient.getInstance().api.getBusinessList(map.toRequestBody()),
                object : BaseSubscriber<List<BusinessBean>>() {
                    override fun dealData(t: BaseBean<List<BusinessBean>>) {
                        super.dealData(t)
                        callBack.onSuccess(t)
                    }
                }
        )
    }
}